package com.tmg.text;


import org.junit.Test;
import redis.clients.jedis.Jedis;

/**
 * 使用jedis操作redis
 */
public class JedisText {
    @Test
    public void testRedis(){
        //获取连接
        Jedis jedis = new Jedis("192.168.93.1",6379);
        //执行操作
        String set = jedis.set("username", "tmg");
        jedis.hset("school","name","hblg");
        System.out.println(set);
        //关闭连接
        jedis.close();
    }

}
